def relations(func):

    def wrapper(*args, **kwargs):  # (self, 'search_key','{{orderid}}')
        args = list(args)  # 将参数的元组数据转换为列表 # [self, 'search_key','{{orderid}}']
        for i in range(1, len(args)):
            for key in args[0].relations.keys():
                k = '{{' + key + '}}'
                args[i] = args[i].replace(k, args[0].relations.get(key))

        # print("关联后的数据为:  %s" % str(args))
        res = func(*args, **kwargs)
        return res

    return wrapper